<?php
class ArticleController extends Apps_Controller_Action_Default {

    public function indexAction() {
        $t = intval($this->_request->getParam('t'));

        if(!$t) {
            $this->_helper->redirector('index', 'home');
        }

        $tbArticle = new Model_DbTable_Article();
        $article = $tbArticle->fetchRow(array('type =?' => $t));

        if(!$article) {
            $this->_helper->redirector('index', 'home');
        }

        $this->view->article = $article;
    }

}